SRCS:=	src/main.cpp \
	src/Game.cpp \
	src/TextureManager.cpp \
	src/SDLGameObject.cpp \
	src/Player.cpp \
	src/InputHandler.cpp \
	src/GameStateMachine.cpp \
	src/MenuState.cpp \
	src/PlayState.cpp \
	src/MenuButton.cpp \
	src/MenuButtonCreator.cpp \
	src/GameObjectFactory.cpp 

OBJS = 	main.o \
	Game.o \
	TextureManager.o \
	ShooterObject.o \
	Player.o \
	InputHandler.o \
	GameStateMachine.o \
	MenuState.o \
	MainMenuState.o \
	PlayState.o \
	MenuButton.o \
	MenuButtonCreator.o \
	EnemyCreator.o \
	StateParser.o \
	GameOverState.o \
	Level.o \
	TileLayer.o \
	LevelParser.o \
	tinystr.o \
	tinyxml.o \
	tinyxmlerror.o \
	tinyxmlparser.o \
	base64.o \
	ObjectLayer.o \
	SoundManager.o \
	GameObjectFactory.o 

#main:
#	c++ -g $(SRCS) -I./include/  -o main `sdl2-config --cflags --libs` -lSDL2_image
main: $(OBJS)
	c++ -g  $(OBJS) -o main `sdl2-config --cflags --libs` -lSDL2_image -lz

#main.o: src/main.cpp
#	c++ -I./include -c src/main.cpp -o main.o `sdl2-config --cflags --libs` -lSDL2_image
$(OBJS): %.o: src/%.cpp
	c++ -g -I./include -c $^ -o $@ `sdl2-config --cflags --libs` -lSDL2_image -lz

run:
	./main
clean:
	rm -rf main *.o
